import { defineNuxtConfig } from "nuxt";

// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
  css: ["@/assets/main.less"],
  buildModules: ["nuxt-windicss"],
  modules: ["@nuxtjs/proxy"],
  app: {
    head: {
      title: "信成医疗首页",
      titleTemplate: "%s - 信成医疗",
      meta: [
        { name: "keywords", content: "信成医疗，医疗软件开发" },
        {
          name: "description",
          content: "信成医疗立足医疗软件开发、医疗器械生产于一体",
        },
      ],
      link: [],
      script: [],
    },
  },
  autoImports: {
    dirs: ["utils", "apis"],
  },
  build: {
    transpile:
      process.env.NODE_ENV === "production"
        ? [
            "naive-ui",
            "vueuc",
            "@css-render/vue3-ssr",
            "@juggle/resize-observer",
          ]
        : ["@juggle/resize-observer"],
  },
  vite: {
    optimizeDeps: {
      include:
        process.env.NODE_ENV === "development"
          ? ["naive-ui", "vueuc", "date-fns-tz/esm/formatInTimeZone"]
          : [],
    },
  },
});
